<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:core="http://www.contact.core.com/contacts/core/ui"
        >

<ui:component>
    <style type="text/css">
        .a1 A:link {
            text-decoration: none;
            color: #20205e;
        }

        .a1 A:visited {
            text-decoration: none;
            color: #20205e;
        }

        .a1 A:active {
            text-decoration: none; /*color: yellow;*/
        }

        .a1 A:hover {
            text-decoration: none;
            background: #20205e; /*font-style: italic;*/
            color: white;
        }

    </style>
    <h:form>
        <core:pictureForView style="width:100%" pictureKey="photoprofile_#{profileSessionBean.information.id}"/>
        <a4j:outputPanel styleClass="a1" layout="block" rendered="#{profile.canSeeAllProfile}">
            <h:panelGrid style="width:100%" columns="1">
                <a4j:commandLink value="#{resources.viewPhotosOfLabel} #{profileSessionBean.information.firstName}"/>
                <rich:separator height="1px" width="100%"/>
                <a4j:commandLink
                        reRender="sendMessageModalPanel"
                        oncomplete="Richfaces.showModalPanel('sendMessageModalPanel'); #{rich:element('messageReceiver')}.value='#{profileSessionBean.information.mailId}';"
                        limitToList="true"
                        >
                    <h:outputFormat value="#{resources.sendAMessageText}">
                        <f:param value="#{profileSessionBean.information.firstName}"/>
                    </h:outputFormat>
                </a4j:commandLink>
                <rich:separator height="1px" width="100%"/>
            </h:panelGrid>
        </a4j:outputPanel>
        <a4j:outputPanel styleClass="a1" layout="block" rendered="#{not profile.canSeeAllProfile}">
            <h:panelGrid style="width:100%" columns="1">
                <a4j:commandLink
                        reRender="sendMessageModalPanel"
                        oncomplete="Richfaces.showModalPanel('sendMessageModalPanel'); #{rich:element('messageReceiver')}.value='#{profileSessionBean.information.mailId}';"
                        limitToList="true"
                        >
                    <h:outputFormat value="#{resources.sendAMessageText}">
                        <f:param value="#{profileSessionBean.information.firstName}"/>
                    </h:outputFormat>
                </a4j:commandLink>
                <rich:separator height="1px" width="100%"/>
            </h:panelGrid>
        </a4j:outputPanel>

        <a4j:outputPanel rendered="#{ profile.canSeeAllProfile}" layout="block" style="width:100%">

            <rich:panel style="width:100%; margin-top:20px; overflow:auto;"
                        header="#{resources.informationLabel}">
                <h:panelGrid columns="1">
                    <h:outputLabel value="#{resources.birthdayLabel}:" style="color:gray;"/>
                    <h:outputText value="#{profileSessionBean.information.birthday}">
                        <f:convertDateTime pattern="MMMMM dd, yyyy."/>
                    </h:outputText>
                </h:panelGrid>
            </rich:panel>


            <core:mutualFriendsBasicViewPanel/>

            <core:allFriendsBasicViewPanel/>
        </a4j:outputPanel>
    </h:form>
</ui:component>


</html>
